コード例 #1
0
ファイル: PulseAEStream.cpp プロジェクト: Foozle303/xbmc
void CPulseAEStream::StreamLatencyUpdateCallback(pa_stream *s, void *userdata)
{
  CPulseAEStream *stream = (CPulseAEStream *)userdata;
  pa_threaded_mainloop_signal(stream->m_MainLoop, 0);
}
コード例 #2
0
void AudioOutputPulseAudio::WriteCallback(pa_stream *s, size_t size, void *arg)
{
    AudioOutputPulseAudio *audoutP = static_cast<AudioOutputPulseAudio*>(arg);
    pa_threaded_mainloop_signal(audoutP->mainloop, 0);
}
コード例 #3
0
ファイル: PulseAEStream.cpp プロジェクト: Foozle303/xbmc
void CPulseAEStream::StreamRequestCallback(pa_stream *s, size_t length, void *userdata)
{
  CPulseAEStream *stream = (CPulseAEStream *)userdata;
  pa_threaded_mainloop_signal(stream->m_MainLoop, 0);
}
コード例 #4
0
static void success_callback(pa_stream *stream,
                             int success,
                             pa_threaded_mainloop *mainloop)
{
    pa_threaded_mainloop_signal(mainloop, 0);
}
コード例 #5
0
ファイル: mainloop.c プロジェクト: OneDream/faplayer
/**
 * Signals the main loop.
 */
void vlc_pa_signal (int do_wait)
{
    pa_threaded_mainloop_signal (vlc_pa_mainloop, do_wait);
}
コード例 #6
0
ファイル: AESinkPULSE.cpp プロジェクト: Karlson2k/xbmc
static void StreamLatencyUpdateCallback(pa_stream *s, void *userdata)
{
  pa_threaded_mainloop *m = (pa_threaded_mainloop *)userdata;
  pa_threaded_mainloop_signal(m, 0);
}
コード例 #7
0
ファイル: ao_pulse.c プロジェクト: jmglogow/mpv
static void stream_latency_update_cb(pa_stream *s, void *userdata)
{
    struct ao *ao = userdata;
    struct priv *priv = ao->priv;
    pa_threaded_mainloop_signal(priv->mainloop, 0);
}
コード例 #8
0
ファイル: tsmf_pulse.c プロジェクト: JozLes77/FreeRDP
static void tsmf_pulse_stream_success_callback(pa_stream *stream, int success, void *userdata)
{
	TSMFPulseAudioDevice *pulse = (TSMFPulseAudioDevice *) userdata;
	pa_threaded_mainloop_signal(pulse->mainloop, 0);
}
コード例 #9
0
ファイル: tsmf_pulse.c プロジェクト: JozLes77/FreeRDP
static void tsmf_pulse_stream_request_callback(pa_stream *stream, size_t length, void *userdata)
{
	TSMFPulseAudioDevice *pulse = (TSMFPulseAudioDevice *) userdata;
	DEBUG_TSMF("%d", (int) length);
	pa_threaded_mainloop_signal(pulse->mainloop, 0);
}
コード例 #10
0
static void success_cb(pa_stream *s, int success, void *userdata) {
    if (userdata)
        *(int *)userdata = success;
    pa_threaded_mainloop_signal(mainloop, 0);
}
コード例 #11
0
ファイル: DrvHostPulseAudio.cpp プロジェクト: miguelinux/vbox
/**
 * Signal the main loop to abort. Just signalling isn't sufficient as the
 * mainloop might not have been entered yet.
 */
static void drvHostPulseAudioAbortMainLoop(void)
{
    g_fAbortMainLoop = true;
    pa_threaded_mainloop_signal(g_pMainLoop, 0);
}
コード例 #12
0
static void stream_latency_update_cb(pa_stream *s, void *userdata) {
    pa_threaded_mainloop_signal(mainloop, 0);
}
コード例 #13
0
static void stream_request_cb(pa_stream *s, size_t length, void *userdata) {
    pa_threaded_mainloop_signal(mainloop, 0);
}
コード例 #14
0
static void stream_request_cb(pa_stream *s, size_t length, void *userdata) {
    pa_simple *p = userdata;
    pa_assert(p);

    pa_threaded_mainloop_signal(p->mainloop, 0);
}
コード例 #15
0
ファイル: PulseAEStream.cpp プロジェクト: Foozle303/xbmc
void CPulseAEStream::StreamUnderflowCallback(pa_stream *s, void *userdata)
{
  CPulseAEStream *stream = (CPulseAEStream *)userdata;
  CLog::Log(LOGWARNING, "PulseAudio: Stream underflow");
  pa_threaded_mainloop_signal(stream->m_MainLoop, 0);
}
コード例 #16
0
/**
 * @brief Callback function called when PA asks for more audio data.
 * @param s Stream on which data is requested
 * @param nbytes the number of bytes PA requested
 * @param this_gen pulse_driver_t pointer for the PulseAudio output
 *        instance.
 */
static void __xine_pa_stream_request_callback(pa_stream *s, size_t nbytes, void *this_gen)
{
  pulse_driver_t * this = (pulse_driver_t*) this_gen;

  pa_threaded_mainloop_signal(this->mainloop, 0);
}
コード例 #17
0
ファイル: AESinkPULSE.cpp プロジェクト: Karlson2k/xbmc
static void StreamRequestCallback(pa_stream *s, size_t length, void *userdata)
{
  pa_threaded_mainloop *m = (pa_threaded_mainloop *)userdata;
  pa_threaded_mainloop_signal(m, 0);
}
コード例 #18
0
/**
 * @brief Callback function called when PA notifies about something
 * @param s Stream on which the notification happened
 * @param this_gen pulse_driver_t pointer for the PulseAudio output
 *        instance.
 */
static void __xine_pa_stream_notify_callback(pa_stream *s, void *this_gen)
{
  pulse_driver_t * this = (pulse_driver_t*) this_gen;

  pa_threaded_mainloop_signal(this->mainloop, 0);
}
コード例 #19
0
ファイル: AESinkPULSE.cpp プロジェクト: Karlson2k/xbmc
static void SinkInfoRequestCallback(pa_context *c, const pa_sink_info *i, int eol, void *userdata)
{

  SinkInfoStruct *sinkStruct = (SinkInfoStruct *)userdata;
  if (!sinkStruct)
    return;

  if(sinkStruct->list->empty())
  {
    //add a default device first
    CAEDeviceInfo defaultDevice;
    defaultDevice.m_deviceName = std::string("Default");
    defaultDevice.m_displayName = std::string("Default");
    defaultDevice.m_displayNameExtra = std::string("Default Output Device (PULSEAUDIO)");
    defaultDevice.m_dataFormats.insert(defaultDevice.m_dataFormats.end(), defaultDataFormats, defaultDataFormats + ARRAY_SIZE(defaultDataFormats));
    defaultDevice.m_channels = CAEChannelInfo(AE_CH_LAYOUT_2_0);
    defaultDevice.m_sampleRates.assign(defaultSampleRates, defaultSampleRates + ARRAY_SIZE(defaultSampleRates));
    defaultDevice.m_deviceType = AE_DEVTYPE_PCM;
    sinkStruct->list->push_back(defaultDevice);
  }
  if (i && i->name)
  {
    CAEDeviceInfo device;
    bool valid = true;
    device.m_deviceName = std::string(i->name);
    device.m_displayName = std::string(i->description);
    if (i->active_port && i->active_port->description)
      device.m_displayNameExtra = std::string((i->active_port->description)).append(" (PULSEAUDIO)");
    else
      device.m_displayNameExtra = std::string((i->description)).append(" (PULSEAUDIO)");
    unsigned int device_type = AE_DEVTYPE_PCM; //0

    device.m_channels = PAChannelToAEChannelMap(i->channel_map);

    // Don't add devices that would not have a channel map
    if(device.m_channels.Count() == 0)
      valid = false;

    device.m_sampleRates.assign(defaultSampleRates, defaultSampleRates + ARRAY_SIZE(defaultSampleRates));

    for (unsigned int j = 0; j < i->n_formats; j++)
    {
      switch(i->formats[j]->encoding)
      {
        case PA_ENCODING_AC3_IEC61937:
          device.m_dataFormats.push_back(AE_FMT_AC3);
          device_type = AE_DEVTYPE_IEC958;
          break;
        case PA_ENCODING_DTS_IEC61937:
          device.m_dataFormats.push_back(AE_FMT_DTS);
          device_type = AE_DEVTYPE_IEC958;
          break;
        case PA_ENCODING_EAC3_IEC61937:
          device.m_dataFormats.push_back(AE_FMT_EAC3);
          device_type = AE_DEVTYPE_IEC958;
          break;
        case PA_ENCODING_PCM:
          device.m_dataFormats.insert(device.m_dataFormats.end(), defaultDataFormats, defaultDataFormats + ARRAY_SIZE(defaultDataFormats));
          break;
        default:
          break;
      }
    }
    // passthrough is only working when device has Stereo channel config
    if (device_type > AE_DEVTYPE_PCM && device.m_channels.Count() == 2)
      device.m_deviceType = AE_DEVTYPE_IEC958;
    else
      device.m_deviceType = AE_DEVTYPE_PCM;
    if(valid)
    {
      CLog::Log(LOGDEBUG, "PulseAudio: Found %s with devicestring %s", device.m_displayName.c_str(), device.m_deviceName.c_str());
      sinkStruct->list->push_back(device);
    }
    else
    {
      CLog::Log(LOGDEBUG, "PulseAudio: Skipped %s with devicestring %s", device.m_displayName.c_str(), device.m_deviceName.c_str());
    }
  }
  pa_threaded_mainloop_signal(sinkStruct->mainloop, 0);
}
コード例 #20
0
void pulse_signal(int wait_for_accept)
{
	pa_threaded_mainloop_signal(pulse_mainloop, wait_for_accept);
}
コード例 #21
0
ファイル: rdpsnd_pulse.c プロジェクト: roman-b/FreeRDP-1.0
static void rdpsnd_pulse_stream_success_callback(pa_stream* stream, int success, void* userdata)
{
	rdpsndPulsePlugin* pulse = (rdpsndPulsePlugin*)userdata;

	pa_threaded_mainloop_signal(pulse->mainloop, 0);
}
コード例 #22
0
static void write_stream_callback(pa_stream *stream,
                                  size_t nbytes,
                                  pa_threaded_mainloop *mainloop)
{
    pa_threaded_mainloop_signal(mainloop, 0);
}