mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
src/xi.c : Expose string info for application and title.
Based on a patch from Stefan Sauer <ensonic@users.sf.net>. Closes: https://github.com/erikd/libsndfile/pull/53
This commit is contained in:
parent
f6c5617f1a
commit
13e58306ca
10
src/xi.c
10
src/xi.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright (C) 2003-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
** Copyright (C) 2003-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify
|
||||
** it under the terms of the GNU Lesser General Public License as published by
|
||||
@ -352,11 +352,19 @@ xi_read_header (SF_PRIVATE *psf)
|
||||
return SFE_XI_BAD_HEADER ;
|
||||
|
||||
buffer [22] = 0 ;
|
||||
for (k = 21 ; k >= 0 && buffer [k] == ' ' ; k --)
|
||||
buffer [k] = 0 ;
|
||||
|
||||
psf_log_printf (psf, "Extended Instrument : %s\n", buffer) ;
|
||||
psf_store_string (psf, SF_STR_TITLE, buffer) ;
|
||||
|
||||
psf_binheader_readf (psf, "be2", buffer, 20, &version) ;
|
||||
buffer [19] = 0 ;
|
||||
for (k = 18 ; k >= 0 && buffer [k] == ' ' ; k --)
|
||||
buffer [k] = 0 ;
|
||||
|
||||
psf_log_printf (psf, "Software : %s\nVersion : %d.%02d\n", buffer, version / 256, version % 256) ;
|
||||
psf_store_string (psf, SF_STR_SOFTWARE, buffer) ;
|
||||
|
||||
/* Jump note numbers (96), volume envelope (48), pan envelope (48),
|
||||
** volume points (1), pan points (1)
|
||||
|
Loading…
Reference in New Issue
Block a user