~ubuntu-branches/ubuntu/trusty/mpd/trusty

« back to all changes in this revision

Viewing changes to src/crossfade.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
28
28
 *
29
29
 * @param duration the requested crossfade duration
30
30
 * @param total_time total_time the duration of the new song
 
31
 * @param mixramp_db the current mixramp_db setting
 
32
 * @param mixramp_delay the current mixramp_delay setting
 
33
 * @param replay_gain_db the ReplayGain adjustment used for this song
 
34
 * @param replay_gain_prev_db the ReplayGain adjustment used on the last song
 
35
 * @param mixramp_start the next songs mixramp_start tag
 
36
 * @param mixramp_prev_end the last songs mixramp_end setting
31
37
 * @param af the audio format of the new song
32
38
 * @param old_format the audio format of the current song
33
39
 * @param max_chunks the maximum number of chunks
35
41
 * should be disabled for this song change
36
42
 */
37
43
unsigned cross_fade_calc(float duration, float total_time,
 
44
                         float mixramp_db, float mixramp_delay,
 
45
                         float replay_gain_db, float replay_gain_prev_db,
 
46
                         char *mixramp_start, char *mixramp_prev_end,
38
47
                         const struct audio_format *af,
39
48
                         const struct audio_format *old_format,
40
49
                         unsigned max_chunks);
41
50
 
42
 
/**
43
 
 * Applies cross fading to two chunks, i.e. mixes these chunks.
44
 
 * Internally, this calls pcm_mix().
45
 
 *
46
 
 * @param a the chunk in the current song (and the destination chunk)
47
 
 * @param b the according chunk in the new song
48
 
 * @param format the audio format of both chunks (must be the same)
49
 
 * @param current_chunk the relative index of the current chunk
50
 
 * @param num_chunks the number of chunks used for cross fading
51
 
 */
52
 
void cross_fade_apply(struct music_chunk *a, const struct music_chunk *b,
53
 
                      const struct audio_format *format,
54
 
                      unsigned int current_chunk, unsigned int num_chunks);
55
 
 
56
51
#endif