Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo,

da ich nun leider nicht "der" Mathematiker bin, hätte ich mal eine Frage.

Ich bin momentan dabei, eine Anwendung zu programmieren, welche mir 2 Bytes aufzeichnet. (Linker und rechter Soundkanal)

Dieses funktioniert soweit auch schon ganz gut, wenn da nicht dieses "aber" wäre.

Folgendes Problem habe ich:

Schreibe ich die Bytes, wie sie ankommen, in die WAV Datei, erhalte ich umgekehrte, negative Amplituden

negative.png

    public void doCapture(byte a, byte {

        CPC.tapesample[CPC.recordcount] = a;

        CPC.recordcount++;

        CPC.tapesample[CPC.recordcount] = b;

        CPC.recordcount++;

    }[/code]




Ändere ich diesen Code nun etwas, erhalte ich nur positive Amplituden:

[code] public void doCapture(byte a, byte B){ CPC.tapesample[CPC.recordcount] = (byte)(a^0x80); CPC.recordcount++; CPC.tapesample[CPC.recordcount] = (byte)(b^0x80); CPC.recordcount++; }

Kann mir jemand helfen, und mir sagen, was ich tun muss, damit ich Amplituden so erhalte, dass sie negativ/positiv sind?

goal.png

Dieses hier ist mein gewünschtes Ziel in der Ausgabe.

MfG

Markus

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.