diff options
Diffstat (limited to '')
-rw-r--r-- | src/pcm_dsd_usb.h (renamed from src/songvec.h) | 47 |
1 files changed, 19 insertions, 28 deletions
diff --git a/src/songvec.h b/src/pcm_dsd_usb.h index 8a50b974b..389358459 100644 --- a/src/songvec.h +++ b/src/pcm_dsd_usb.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2010 The Music Player Daemon Project + * Copyright (C) 2003-2012 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -17,35 +17,26 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef MPD_SONGVEC_H -#define MPD_SONGVEC_H +#ifndef MPD_PCM_DSD_USB_H +#define MPD_PCM_DSD_USB_H -#include <stddef.h> - -struct songvec { - struct song **base; - size_t nr; -}; - -void songvec_init(void); - -void songvec_deinit(void); - -void songvec_sort(struct songvec *sv); +#include "check.h" -struct song * -songvec_find(const struct songvec *sv, const char *uri); - -int -songvec_delete(struct songvec *sv, const struct song *del); - -void -songvec_add(struct songvec *sv, struct song *add); +#include <stdbool.h> +#include <stdint.h> +#include <stddef.h> -void songvec_destroy(struct songvec *sv); +struct pcm_buffer; -int -songvec_for_each(const struct songvec *sv, - int (*fn)(struct song *, void *), void *arg); +/** + * Pack DSD 1 bit samples into (padded) 24 bit PCM samples for + * playback over USB, according to the proposed standard by + * dCS and others: + * http://www.sonore.us/DoP_openStandard_1v1.pdf + */ +const uint32_t * +pcm_dsd_to_usb(struct pcm_buffer *buffer, unsigned channels, + const uint8_t *src, size_t src_size, + size_t *dest_size_r); -#endif /* SONGVEC_H */ +#endif |