<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello Eduardo,</p>
    <p>First of all, I'm glad to hear you have found the problem and
      have things working now.<br>
    </p>
    <p>I have not personally had time to use the Linux port.  However,
      it would appear that, when you compile your code, the compiler is
      not seeing function prototypes for the functions being called. 
      The compiler is therefore passing parameters that appear to be
      type 'int' as type 'int'.  If I am correct, the matter could also
      be resolved by including function prototypes such as</p>
    <p>SetTXABandpassFreqs (int channel, double f_low, double f_high);</p>
    <p>Best wishes for your future successes using WDSP.</p>
    <p>73,</p>
    <p>Warren  NR0V<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 5/5/2017 6:39 AM, Eduardo Alonso
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAB0tz7V3hnsP=D+nw9jAbaViGk+S13xEmzk9n5vfKRNxy=GnLA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>hello all,<br>
            hello Warren,<br>
            <br>
            As you suggested, I tested the library using the internal
            generator.<br>
          </div>
          I found the same problems, all times related to the frequency
          settings,<br>
        </div>
        <div>but not with amplitudes. <br>
          <br>
          After thinking a bit, I introduced a small change, and
          voilá... it started to work.<br>
        </div>
        <div>You must do casting before calling the library. <br>
          Lesson learned.<br>
        </div>
        <div><br>
          <span style="color:rgb(0,0,255)"><span
              style="font-family:monospace,monospace"><span
                style="color:rgb(255,0,0)">SetTXABandpassFreqs  
                (1,-15000,3000);                 //fails</span></span></span><br>
          <span style="color:rgb(0,0,255)"><span
              style="font-family:monospace,monospace"><span
                style="color:rgb(255,0,0)"><span
                  style="color:rgb(0,0,255)"><span
                    style="font-family:monospace,monospace">SetTXABandpassFreqs  
                    (1,-15000.0,3000.0);             //works<br>
                  </span></span></span>SetTXABandpassFreqs  
              (1,(double)-15000,(double)3000); //works<br>
            </span></span><br>
        </div>
        <div>Same behavior with GCC-4.9 and CLANG-3.4...<br>
        </div>
        <div>
          <div>
            <div><br>
            </div>
            <div>Well, I am very happy, now I can explore all the
              possibilities of your library.<br>
            </div>
            <div>Thanks for your fast answer and four your amazing
              contribution to the ham community.<br>
              <br>
              73 Eduardo<br>
              <br>
              ps:<br>
              A last word, I was playing also with the last parameter of
              OpenChannel(....,bfo).<br>
              I tried to call OpenChannel with bfo=1 without luck. <br>
              I was interested in using WDSP in a batch processing. <br>
              Maybe this problem is related to the linux port.<br>
              <br>
              <br>
              <br>
              <br>
              <span style="font-family:monospace,monospace">=== WDSP
                init sequence:<br>
                <br>
                main()<br>
                {<br>
                <br>
                OpenChannel           (1,FRAMES, 2048, 48000, 48000,
                48000, 1, 0, 0.010, 0.025, 0.000, 0.010, 0);<br>
                SetTXAMode            (1,TXA_USB); <br>
                TXASetNC              (1,2048); <br>
                TXASetMP              (1,0);<br>
                <br>
                //NOISE<br>
                SetTXAPreGenMode    (1,2);     //2=noise<br>
                SetTXAPreGenNoiseMag(1,0.1);<wbr>   <br>
                <br>
                //SetTXABandpassFreqs   (1,-15000,3000); //fails<br>
                //SetTXABandpassFreqs   (1,(double)-15000,(double)3000);
                //work<br>
                SetTXABandpassFreqs   (1,-15000.0,3000.0); //work<br>
                <br>
                SetTXAPreGenRun       (1,1);  <br>
                SetChannelState       (1,1,1);<br>
                fprintf(stderr,"run\n");<br>
                <br>
                while(1) {..}<br>
                }<br>
                <br>
              </span><br>
            </div>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, May 2, 2017 at 6:56 PM, Warren
          C. Pratt <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:warren@wpratt.com" target="_blank">warren@wpratt.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <p>Hello Eduardo,</p>
              <p>My first suggestion is to test with the built-in
                "PreGen" signal generator, being sure to use a tone
                frequency inside the filter bandwidth you specify.  I
                see in your code that you have experimented with that
                before as you have commented-out some calls to it.<br>
              </p>
              <p>73,</p>
              <p>Warren  NR0V<br>
              </p>
              <div>
                <div class="h5"> <br>
                  <div class="m_-3814797779047553709moz-cite-prefix">On
                    5/2/2017 5:00 AM, Eduardo Alonso wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr"><span
                        style="font-family:monospace,monospace">Hello
                        friends,<br>
                        Hello Matt,<br>
                        <br>
                        I am having problems in my first steps with WDSP
                        library under linux.<br>
                        With the very minimal example that I copy below,
                        everything runs fine.<br>
                        see: <a moz-do-not-send="true"
                          href="http://ea3ghs.qrp.cat/332-tx-fm.png"
                          target="_blank">http://ea3ghs.qrp.cat/332-tx-<wbr>fm.png</a><br>
                        <br>
                        But if I call <span style="color:rgb(0,0,255)"><span
                            style="background-color:rgb(255,255,255)">SetTXABandpassFreqs(1,-3000,<wbr>3000)</span></span>
                        the output signal disappears !!!.<br>
                        <br>
                        This problem also appears in other modes than
                        FM.<br>
                        I think I am not initializing correctly the
                        library, but in<br>
                        the documentation says nothing about the correct
                        (init) procedure.<br>
                        <br>
                        Could you give some clues?<br>
                        Thanks in advance,<br>
                        Eduardo EA3GHS<br>
                        <br>
                        <span style="color:rgb(0,0,255)">//WDSP EXAMPLE<br>
                          //complete code: <a moz-do-not-send="true"
                            href="http://ea3ghs.qrp.cat/332c.tgz"
                            target="_blank">http://ea3ghs.qrp.cat/332c.tgz</a><br>
                          main()<br>
                          {<br>
                          SNDReset();<br>
                          <br>
                          OpenChannel(1, FRAMES, 2048, 48000, 48000,
                          48000, 1, 0, 0.010, 0.025, 0.000, 0.010, 0);<br>
                          SetTXAMode(1,TXA_FM);<br>
                          TXASetNC(1, 2048);<br>
                          TXASetMP(1, 0);<br>
                          //SetTXABandpassFreqs(1,-3000,<wbr>3000);
                           //if I activate this line, I will have no
                          output signal<br>
                          SetChannelState (1,1,1);<br>
                          <br>
                          while(1)<br>
                              {<br>
                              SNDRead(); //blocking read call<br>
                              for(i=0;i<BUF;i++){in[i]=(<wbr>double)rdbuf[i];in[i]/=0x7fff;<wbr>}<br>
                              e=0; do {fexchange0(1,in,out,&e);}
                          while(e);<br>
                              for(i=0;i<BUF;i++){wrbuf[i]=(<wbr>s16)(out[i]*0x7fff);}<br>
                              SNDWrite();<br>
                              }<br>
                          }<br>
                          //END</span><br>
                        <br>
                        ps:<br>
                        The library version is the Linux port from John
                        Melton, and<br>
                        inside comm.h appears a "(C) 2017 Warren Pratt,
                        NR0V, Jae Stutzman, K5JAE"<br>
                        see <a moz-do-not-send="true"
                          href="http://ea3ghs.qrp.cat/332c.tgz"
                          target="_blank">http://ea3ghs.qrp.cat/332c.tgz</a><br>
                      </span><br>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>