~ubuntu-branches/ubuntu/saucy/mpd/saucy

« back to all changes in this revision

Viewing changes to src/pcm_convert.h

  • Committer: Bazaar Package Importer
  • Author(s): Angel Abad
  • Date: 2011-02-02 12:26:30 UTC
  • mfrom: (1.5.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20110202122630-bdyx8w4k94doz4fs
Tags: 0.16.1-1ubuntu1
* Merge from debian unstable. Remaining changes:
  - debian/control:
    + Don't build-depend on libmikmod2-dev (Debian bug #510675).
    + Move avahi-daemon from Suggests field to Recommends field.
  - debian/mpd.init.d:
    + Read mpd user from mpd.conf.
  - debian/control, debian/rules:
    + Add libmp3lame-dev to the build dependencies and enable lame.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2003-2009 The Music Player Daemon Project
 
2
 * Copyright (C) 2003-2010 The Music Player Daemon Project
3
3
 * http://www.musicpd.org
4
4
 *
5
5
 * This program is free software; you can redistribute it and/or modify
39
39
        /** the buffer for converting the sample format */
40
40
        struct pcm_buffer format_buffer;
41
41
 
 
42
        /** the buffer for converting to/from packed samples */
 
43
        struct pcm_buffer pack_buffer;
 
44
 
42
45
        /** the buffer for converting the channel count */
43
46
        struct pcm_buffer channels_buffer;
 
47
 
 
48
        /** the buffer for swapping the byte order */
 
49
        struct pcm_buffer byteswap_buffer;
44
50
};
45
51
 
 
52
static inline GQuark
 
53
pcm_convert_quark(void)
 
54
{
 
55
        return g_quark_from_static_string("pcm_convert");
 
56
}
 
57
 
46
58
/**
47
59
 * Initializes a pcm_convert_state object.
48
60
 */
63
75
 * @param src_size the size of #src in bytes
64
76
 * @param dest_format the requested destination audio format
65
77
 * @param dest_size_r returns the number of bytes of the destination buffer
66
 
 * @return the destination buffer
 
78
 * @param error_r location to store the error occuring, or NULL to
 
79
 * ignore errors
 
80
 * @return the destination buffer, or NULL on error
67
81
 */
68
82
const void *
69
83
pcm_convert(struct pcm_convert_state *state,
70
84
            const struct audio_format *src_format,
71
85
            const void *src, size_t src_size,
72
86
            const struct audio_format *dest_format,
73
 
            size_t *dest_size_r);
 
87
            size_t *dest_size_r,
 
88
            GError **error_r);
74
89
 
75
90
#endif