Другие языки программирования и технологии

как переделать формат ".wv" в ".mp3" ?

муз. файл .wv, там записаны все песни подряд, возможно ли их по отдельности расписать или придёться по одной вырезать?
Audio Transcoder
Al1618 Al
Al1618 Al
9 979
Лучший ответ
прогой Format Factory качайте тут - http://biblprog.org.ua/ru/format_factory/
Качай муз конвектр
M.
Mario .
3 661
http://lame.cvs.sourceforge.net/viewvc/lame/lame/test/lame_test.cpp?revision=1.1&view=markup
1// LAME test program
2//
3// Copyright (c) 2010 Robert Hegemann
4//
5// This library is free software; you can redistribute it and/or
6// modify it under the terms of the GNU Lesser General Public
7// License as published by the Free Software Foundation; either
8// version 2 of the License, or (at your option) any later version.
9//
10// This library is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13// Library General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public
16// License along with this library; if not, write to the
17// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18// Boston, MA 02111-1307, USA.
19
20#include <lame.h>
21#include <wchar.h>
22#include <stdlib.h>
23
24
25class PcmGenerator
26{
27 float* m_buffer_ch0;
28 float* m_buffer_ch1;
29 int m_size;
30 float m_a;
31 float m_b;
32
33 double random()
34 {
35 int const range_max = 32768;
36 int const range_min = -32767;
37 return (double)rand() / (RAND_MAX + 1) * (range_max - range_min) + range_min;
38 }
39public:
40
41 explicit PcmGenerator(int size)
42 {
43 m_size = size >= 0? size : 0;
44 m_buffer_ch0 = new float [m_size];
45 m_buffer_ch1 = new float [m_size];
46 m_a = 0;
47 m_b = 0;
48 advance(0);
49 }
50
51 ~PcmGenerator()
52 {
53 delete[] m_buffer_ch0;
54 delete[] m_buffer_ch1;
55 }
56
57 float const* ch0() const { return m_buffer_ch0; }
58 float const* ch1() const { return m_buffer_ch1; }
59
60 void advance( int x ) {
61 float a = m_a;
62 float b = m_b;
63 for (int i = 0; i < m_size; ++i) {
64 a += 10;
65 if (a > 32768) a = random();
66 b -= 10;
67 if (b < -32767) b = random();
68 m_buffer_ch0 = a;
69 m_buffer_ch1 = b;
70 }
71 m_a = a;
72 m_b = b;
73 }
74};
75
76class OutFile
77{
78 FILE* m_file_handle;
79
80public:
81 OutFile()
82 : m_file_handle(0)
83 {}
84
85 explicit OutFile(wchar_t const* filename)
86 : m_file_handle(0)
87 {
88 m_file_handle = _wfopen(filename, L"wb");
89 }
90
91 ~OutFile()
92 {
93 close();
94 }
95
96 bool isOpen() const {
97 return 0 != m_file_handle;
98 }
99
100 void close() {
101 if (isOpen()) {
102 fclose(m_file_handle);
103 m_file_handle = 0;
104 }
105 }
106
107 void write(unsigned char const* data, int n) {
108 fwrite(data, 1, n, m_file_handle);
109 }
110};
111
112class Lame
113{
114 lame_t m_gf;
115 bool m_init_params_called;
116
117 void ensureInitialized() {
118 if (isOpen()) {
119 if (!m_init_params_called) {
120 m_init_params_called = true;
121 lame_init_params(m_gf);
122 }
123 }
124 }
125
126public:
127
128 Lame()
129 : m_gf( lame_init() )
130, m_init_params_called( false )
131 {}
132
133 ~Lame()
134 {
135 close();
136 }
137
138 void close() {
139 if (isOpen()) {
140 lame_close(m_gf);
141 m_gf = 0;
142 }
143 }
144
145 bool isOpen() const {
146 return m_gf != 0;
147 }
148
149 operator lame_t () {
150 return m_gf;
151 }
152 operator lame_t () const {
153 return m_gf;
154 }
155
156 void setInSamplerate( int rate ) {
157 lame_set_in_samplerate(m_gf, rate);
158 }
159
160 void setOutSamplerate( int rate ) {
161 lame_set_out_samplerate(m_gf, rate);
162 }
163
164 void setNumChannels( int num_channel ) {
165 lame_set_num_channels(m_gf, num_channel);
1
Mister_Argyn Parmenov
Mister_Argyn Parmenov
1 765