Subversion Repositories Kolibri OS

Rev

Rev 3963 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3963 Rev 4102
Line 127... Line 127...
127
 
127
 
Line 128... Line 128...
128
        xor     ebx, ebx             ;totalcount
128
        xor     ebx, ebx             ;totalcount
Line 129... Line 129...
129
 
129
 
-
 
130
.inner:
-
 
131
    ;    int3
130
.inner:
132
        mov     [count], 0
-
 
133
        call    [mpg123_read]
131
        call    [mpg123_read]
134
        mov     ebx, [count]
132
        test    eax, eax
135
        test    eax, eax
133
        jz      @F
-
 
134
        mov     [done], eax
-
 
135
        jmp     .check_done
-
 
136
@@:
-
 
137
        mov     eax, [count]
-
 
138
        add     [esp+4], eax
136
        jz      @F
139
        add     ebx, eax
-
 
140
        sub     [esp+8], eax
-
 
141
        shl     eax, 1
-
 
142
        cmp     eax, [esp+8]
137
        test    ebx, ebx
143
        jb      .inner
-
 
144
 
-
 
145
.check_done:
-
 
146
        cmp     [done], 0
-
 
147
        je      @F
-
 
148
 
-
 
149
        cmp     ebx, 4096
-
 
150
        jae     .write_out
-
 
151
 
-
 
152
        mov     edi, [esp+16]
-
 
153
        mov     ecx, 4096
-
 
154
        sub     ecx, ebx
-
 
155
        rep     movsb
-
 
156
        mov     ebx, 4096
-
 
157
 
-
 
158
        jmp     .write_out
138
        jz      .done
159
@@:
-
 
160
        mov     [count], 0
-
 
161
        cmp     ebx, 8192
-
 
162
        jb      .inner
-
 
163
 
139
@@:
164
.write_out:
-
 
-
 
140
.write_out:
-
 
141
        add     ebx, 4095
165
 
142
        and     ebx, -4096
166
        mov     esi, [esp+16]
-
 
167
@@:
-
 
168
        cmp     ebx, 4096
-
 
169
        jb      @F
-
 
170
 
143
        mov     esi, [esp+16]
171
        stdcall WaveOut, [hBuff], esi, 4096
-
 
172
        sub     ebx, 4096
-
 
173
        add     esi, 4096
144
        stdcall WaveOut, [hBuff], esi, ebx
174
        add     [esp+8], dword 4096
-
 
175
        jmp     @B
-
 
176
@@:
145
        mov     [esp+8], dword 0x40000
177
        mov     edi, [esp+16]
-
 
178
        mov     ecx, ebx
-
 
179
        rep     movsb
146
        mov     edi, [esp+16]
180
        mov     [esp+4], edi
147
        mov     [esp+4], edi
181
        jmp     .inner
-
 
182
 
148
        jmp     .inner
-
 
149
.done:
-
 
150
        mov     edi, [esp+16]
-
 
151
        mov     ecx, 4096
-
 
152
        xor     eax, eax
-
 
153
        rep     stosd
-
 
154
        mov     esi, [esp+16]
183
.done:
155
        stdcall WaveOut, [hBuff], esi, 16384
184
        add     esp, 20
156
        add     esp, 20
185
        pop     edi
157
        pop     edi
Line 186... Line 158...
186
        pop     esi
158
        pop     esi
Line 689... Line 661...
689
__pgmname: rb 1024
661
__pgmname: rb 1024
690
           rb 16
662
           rb 16
691
__stack:
663
__stack:
692
__bssend:
664
__bssend:
693
665
-
 
666
-
 
667