~ubuntu-branches/ubuntu/oneiric/pulseaudio/oneiric

« back to all changes in this revision

Viewing changes to src/modules/module-esound-sink.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2007-12-04 00:56:08 UTC
  • mto: (1.15.1 sid)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: james.westby@ubuntu.com-20071204005608-3lzrrrpxi186kgx4
Tags: upstream-0.9.8
ImportĀ upstreamĀ versionĀ 0.9.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: module-esound-sink.c 1988 2007-10-29 21:23:08Z lennart $ */
 
1
/* $Id: module-esound-sink.c 2043 2007-11-09 18:25:40Z lennart $ */
2
2
 
3
3
/***
4
4
  This file is part of PulseAudio.
64
64
 
65
65
#include "module-esound-sink-symdef.h"
66
66
 
67
 
PA_MODULE_AUTHOR("Lennart Poettering")
68
 
PA_MODULE_DESCRIPTION("ESOUND Sink")
69
 
PA_MODULE_VERSION(PACKAGE_VERSION)
 
67
PA_MODULE_AUTHOR("Lennart Poettering");
 
68
PA_MODULE_DESCRIPTION("ESOUND Sink");
 
69
PA_MODULE_VERSION(PACKAGE_VERSION);
 
70
PA_MODULE_LOAD_ONCE(FALSE);
70
71
PA_MODULE_USAGE(
71
72
        "sink_name=<name for the sink> "
72
73
        "server=<address> cookie=<filename>  "
73
74
        "format=<sample format> "
74
75
        "channels=<number of channels> "
75
 
        "rate=<sample rate>")
 
76
        "rate=<sample rate>");
76
77
 
77
78
#define DEFAULT_SINK_NAME "esound_out"
78
79
 
506
507
    pa_modargs *ma = NULL;
507
508
    char *t;
508
509
    const char *espeaker;
 
510
    uint32_t key;
509
511
 
510
512
    pa_assert(m);
511
513
 
584
586
        pa_log("Failed to load cookie");
585
587
        goto fail;
586
588
    }
587
 
    *(int32_t*) ((uint8_t*) u->write_data + ESD_KEY_LEN) = ESD_ENDIAN_KEY;
 
589
 
 
590
    key = ESD_ENDIAN_KEY;
 
591
    memcpy((uint8_t*) u->write_data + ESD_KEY_LEN, &key, sizeof(key));
588
592
 
589
593
    /* Reserve space for the response */
590
594
    u->read_data = pa_xmalloc(u->read_length = sizeof(int32_t));