Skip site navigation (1)Skip section navigation (2)
Date:      27 Jun 1999 13:00:53 +0200
From:      Frode Vatvedt Fjeld <frodef@acm.org>
To:        freebsd-multimedia@freebsd.org
Subject:   Re: bt848 channel frequencies
Message-ID:  <2h7lopaowq.fsf@dslab7.cs.uit.no>
In-Reply-To: lyndon@orthanc.ab.ca's message of "Sat, 26 Jun 1999 15:32:40 -0600"
References:  <199906262132.PAA05313@orthanc.ab.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
lyndon@orthanc.ab.ca writes:
> Why not hide the implementation in the library and just pass the
> frequency (in around as an ASCII string?

The frequencies will be stored on disk using ASCII, obviously. But
sooner or later they must be converted to some integer representation,
and I think the lib should provide this as an utility function
(because it's better to implement things once well, rather than many
times not-so-well).

Perhaps the better solution is to use a composite type for
frequencies:

struct tuner_frequency {
    long MHz;
    long Hz;
    long uHz;
};

This would allow for 0-2 PHz (Peta-Hz :) in steps of micro-Hz, and the
usual TV frequencies are easily extracted.

-- 
Frode Vatvedt Fjeld


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2h7lopaowq.fsf>